package com.saoft.jcms.web.dto;

public class ResponseDTO {

    private int code;
    private String msg;
    private Object data;

    public static ResponseDTO success(){
        ResponseDTO responseDTO = new ResponseDTO();
        responseDTO.setCode(1);
        return responseDTO;
    }
    public static ResponseDTO error(){
        ResponseDTO responseDTO = new ResponseDTO();
        responseDTO.setCode(2);
        responseDTO.setMsg("失败");
        return responseDTO;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
